--
-- Alter script for ParaDM v3.1.7 - v.3.1.9
--

-- By Lun Au (2006-08-23)
-- Request by Ferdinand, Schedule Management performance enhancement
UPDATE CALENDAR_RECORD SET ENDTIME=DATETIME WHERE ENDTIME IS NULL 
GO

-- By Lun Au (2006-11-24)
-- Disable non-standard package features
UPDATE SETUP_OPTION_WORKFLOW_CATEGORY SET STATUS='I' WHERE ID IN (12,13,14) 
GO
UPDATE WORKFLOW_ACTION SET RECORD_STATUS='I' WHERE ID IN (21,22,23) 
GO
UPDATE SYS_FUNCTION SET STATUS='I' WHERE ID IN (4000, 4001, 4002, 4003, 5000, 5001, 5002, 6012)
GO

-- By Lun Au (2006-11-29)
-- EIP-1070, notify self problem
ALTER TABLE UPDATE_ALERT_TYPE ADD NOTIFY_SELF CHAR(1)
GO

UPDATE UPDATE_ALERT_TYPE SET NOTIFY_SELF = 'Y' WHERE  UPDATE_ALERT_TYPE.UPDATE_ALERT_ID IN 
(SELECT A.ID FROM UPDATE_ALERT A,UPDATE_ALERT_TYPE B  WHERE A.ID = B.UPDATE_ALERT_ID AND A.NOTIFY_SELF = 'Y') 
GO

--
-- THIS STATEMENT SHOULD ALWAYS BE PUT AT THE LAST ROW OF THIS FILE
--
UPDATE SYS_PARAMETER SET PARAMETER_VALUE='$RCSfile: alter3.1.7_3.1.9.sql,v $,$Revision: 1.5.4.6 $', UPDATE_COUNT=UPDATE_COUNT+1, UPDATE_DATE=getdate() WHERE ID = -1
GO
